package com.nbot.server.service.impl;

import com.nbot.server.domain.Orcalarm;
import com.nbot.server.mapper.cluster.OrcalarmMapper;
import com.nbot.server.service.OrcalarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrcalarmServiceImpl implements OrcalarmService {
    @Autowired
    OrcalarmMapper orcalarmMapper;

    @Override
    public List<Orcalarm> listAll() {
        return orcalarmMapper.listAll();
    }

    @Override
    public int getCount() {
        return orcalarmMapper.getCount();
    }

    @Override
    public int getTodayCount() {
        return orcalarmMapper.getTodayCount();
    }

    @Override
    public Orcalarm find(String id) {
        return orcalarmMapper.selectByPrimaryKey(id);
    }

    @Override
    public Orcalarm findLastOne() {
        return orcalarmMapper.findLastOne();
    }

    @Override
    public List<Orcalarm> findLastN(int n) {
        return orcalarmMapper.findLastN(n);
    }
}
